import React from 'react';
import Child from './child.jsx';
class App extends React.Component{
    state={
        num:0
    }
    render(){

        let {num} = this.state;
        return (
            <div>好好学习天天向上----{num}  <button onClick={()=>{
                num++;
                this.setState({
                    num
                })
            }}>++</button>
            <Child/>
            </div>
        )
    }
}

export default App;